From 88381e599a556df1b6d7ee03cfeaa1c822083488 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Mon, 7 Feb 2005 11:57:29 +0000 Subject: [PATCH] bitkeeper revision 1.1159.223.74 (420757a9FtyPHOdlg42s6EIT2DD1zw) Pad Xen image to end on a page boundary. Avoids kexec bug. Signed-off-by: keir.fraser@cl.cam.ac.uk --- xen/arch/x86/boot/mkelf32.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c index e16756237b..4f32a7c055 100644 --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -245,6 +245,12 @@ int main(int argc, char **argv) return 1; } + /* + * End the image on a page boundary. This gets round alignment bugs + * in the boot- or chain-loader (e.g., kexec on the XenoBoot CD). + */ + mem_siz += -(loadbase + mem_siz) & 0xfff; + out_ehdr.e_entry = loadbase; out_ehdr.e_shoff = RAW_OFFSET + dat_siz; -- 2.30.2